import os
import os.path
import pptx

total=0
def pptCount(path):
    global total
    for subpath in os.listdir(path):
        subpath=os.path.join(path,subpath)
        if os.path.isdir(subpath):
            pptCount(subpath)
        elif subpath.endswith('.pptx'):
            print(subpath)
            presentation=pptx.Presentation(subpath)
            total +=len(presentation.slides)
x='abc'          
pptCount(x)
print(total)